package dimdidu.board.review;

import java.sql.SQLException;
import java.util.List;

public class BoardReviewManager {
	private static BoardReviewManager instance;
	public BoardReviewDAO dao = BoardReviewDAO.getInstance();
	
	public static BoardReviewManager getInstance(){
		if(instance==null){
			instance = new BoardReviewManager();
		}
		return instance;
	}
	
	private BoardReviewManager(){}

	public int createReview(BoardReviewVO review)throws SQLException{
		int result = dao.createReview(review);
		return result;
		
	}
	public int modifyReview(BoardReviewVO review)throws SQLException{
		
		return dao.modifyReview(review);
	}
	public int deleteReview(int reviewNo) throws SQLException{
		
		return dao.deleteReview(reviewNo);
		
	}
	public BoardReviewVO findReviewByNo(int reviewNo) throws SQLException{
		BoardReviewVO review = dao.findReviewByNo(reviewNo);
		return review;
	}
	public List<BoardReviewVO> findAllReview() throws SQLException{
		return dao.findAllReview();
	}
	public List<BoardReviewVO> findReviewByTitle(String reviewTitle)throws SQLException{

		return dao.findReviewByTitle(reviewTitle);
	
	}
	 
}	














